// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using Elastic.Clients.Elasticsearch.Serverless.Fluent;
using Elastic.Clients.Elasticsearch.Serverless.Serialization;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text.Json;
using System.Text.Json.Serialization;

namespace Elastic.Clients.Elasticsearch.Serverless.Core.Search;

public sealed partial class Hit<TDocument>
{
	[JsonInclude, JsonPropertyName("_explanation")]
	public Elastic.Clients.Elasticsearch.Serverless.Core.Explain.Explanation? Explanation { get; init; }
	[JsonInclude, JsonPropertyName("fields")]
	public IReadOnlyDictionary<string, object>? Fields { get; init; }
	[JsonInclude, JsonPropertyName("highlight")]
	public IReadOnlyDictionary<string, IReadOnlyCollection<string>>? Highlight { get; init; }
	[JsonInclude, JsonPropertyName("_id")]
	public string? Id { get; init; }
	[JsonInclude, JsonPropertyName("_ignored")]
	public IReadOnlyCollection<string>? Ignored { get; init; }
	[JsonInclude, JsonPropertyName("ignored_field_values")]
	public IReadOnlyDictionary<string, IReadOnlyCollection<Elastic.Clients.Elasticsearch.Serverless.FieldValue>>? IgnoredFieldValues { get; init; }
	[JsonInclude, JsonPropertyName("_index")]
	public string Index { get; init; }
	[JsonInclude, JsonPropertyName("inner_hits")]
	public IReadOnlyDictionary<string, Elastic.Clients.Elasticsearch.Serverless.Core.Search.InnerHitsResult>? InnerHits { get; init; }
	[JsonInclude, JsonPropertyName("matched_queries")]
	public IReadOnlyCollection<string>? MatchedQueries { get; init; }
	[JsonInclude, JsonPropertyName("_nested")]
	public Elastic.Clients.Elasticsearch.Serverless.Core.Search.NestedIdentity? Nested { get; init; }
	[JsonInclude, JsonPropertyName("_node")]
	public string? Node { get; init; }
	[JsonInclude, JsonPropertyName("_primary_term")]
	public long? PrimaryTerm { get; init; }
	[JsonInclude, JsonPropertyName("_rank")]
	public int? Rank { get; init; }
	[JsonInclude, JsonPropertyName("_routing")]
	public string? Routing { get; init; }
	[JsonInclude, JsonPropertyName("_score")]
	public double? Score { get; init; }
	[JsonInclude, JsonPropertyName("_seq_no")]
	public long? SeqNo { get; init; }
	[JsonInclude, JsonPropertyName("_shard")]
	public string? Shard { get; init; }
	[JsonInclude, JsonPropertyName("sort")]
	public IReadOnlyCollection<Elastic.Clients.Elasticsearch.Serverless.FieldValue>? Sort { get; init; }
	[JsonInclude, JsonPropertyName("_source")]
	[SourceConverter]
	public TDocument? Source { get; init; }
	[JsonInclude, JsonPropertyName("_version")]
	public long? Version { get; init; }
}